//
//  Park.m
//  HundPark
//
//  Created by Aguilar Rolando on 2013-03-04.
//  Copyright (c) 2013 ARV IT. All rights reserved.
//

#import "Park.h"

@implementation Park
@synthesize distric = _distric;
@synthesize name = _name;
@synthesize info=_info;
@synthesize imageName = _imageName;
@synthesize coordinate = _coordinate;
@synthesize parkId = _parkId;
@synthesize iconName = _iconName;
@synthesize distance=_distance;
@synthesize amountOfDogs = _amountOfDogs;

#define PIN_ICON @"pin_hund.png"
#define DEFAULT_PARKIMAGE @"tempImage.png"


-(id)initWithLongitude:(CGFloat)lon latitude: (CGFloat)lat
{
    self = [super init];
    
    if(self)
    {
        self.coordinate = CLLocationCoordinate2DMake(lat, lon);
        self.iconName = PIN_ICON;
        self.imageName = DEFAULT_PARKIMAGE;
    }
    return self;
}

- (NSString *)title {
    return [NSString stringWithFormat:@"%@",self.name];
}

- (NSString *)subtitle {
    return [NSString stringWithFormat:@"%@",self.distric];
}

-(NSString *) description {
    return [NSString stringWithFormat:@"ID: %@\nName: %@\nInfo: %@\n",
            self.parkId, self.name, self.info];
}

@end
